/*
 * Created by SharpDevelop.
 * User: Tivadar Papai
 * Date: 8/25/2007
 * Time: 6:46 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using RoverStudio.Math;

namespace RoverStudio.Common.WorldModel
{
	/// <summary>
	/// Represents an object which exists in the physical world.
	/// </summary>
	public class PhysicalObject:WorldModelObject
	{
		
		
		private Vector3D position;
		
		/// <summary>
		/// The position of the center of the object.
		/// </summary>
		public Vector3D Position {
			get { return position; }
			set { 
				position = value;
				WorldObjectChanged();
			}
		}
		
		private Vector3D diameter;
		/// <summary>
		/// Gets or sets the vector that points from the center of the object
		/// to its farthest corner (all components are positive).
		/// </summary>
		public Vector3D Diameter {
			get { return diameter; }
			set { 
				diameter = value;
				WorldObjectChanged();
			}
		}
		
		private Rotation orientation;
		
		/// <summary>
		/// Orientation matrix of the vehicle.
		/// </summary>
		public Rotation Orientation {
			get { return orientation; }
			set { 
				orientation = value;
				WorldObjectChanged();
			}
		}
		
		public void SetObjectPositionAndOrientation(Vector3D position, Rotation orientation)
		{
			this.position = position;
			this.orientation = orientation;
			WorldObjectChanged();
				
		}
		public PhysicalObject(string name, WorldModel worldModel):base(name, worldModel)
		{
			
		}

        public PhysicalObject(string name, WorldModel worldModel, Vector3D position, Vector3D diameter, Rotation orientation)
			:base(name, worldModel)
		{
			this.position = position;
			this.diameter = diameter;
			this.orientation = orientation;
		}
		
	}
}
